< previous page page_605 next page >

Page 605
Table 27.4 RDO Objects Methods and Related DAO Methods
RDO MethodRDO ObjectDAO MethodDAO Object
rdoCreateEnvironmentrdoEngineCreateWorkspaceDBEngine
BeginTransrdoConnectionBeginTransWorkspace
CommitTransrdoConnectionCommitTransWorkspace
OpenConnectionrdoEnvironmentOpenDatabaseWorkspace
RollbackTransrdoConnectionRollbackWorkspace
CreateQueryrdoConnectionCreateQueryDefDatabase
ExecuterdoConnectionExecuteDatabase
OpenResultsetrdoConnectionOpenRecordsetDatabase

Finally, the rdoResultset object and the Recordset object have the following methods in common:
AddNewAdds a new row (record) to the set.
DeleteRemoves the current row (record) from the set.
EditPrepares the current row for changing the information in the row.
MoveFirstMoves to the first row of the set.
MoveLastMoves to the last row of the set.
MoveNextMoves to the next row of the set.
MovePreviousMoves to the previous row of the set.
UpdateCommits the changes made to the copy buffer to the actual record. The copy buffer is a memory location that contains the values of the record with which the user is working.
Accessing a Database with RDO
To further illustrate the similarities between the RDO and DAO models, the code in Listings 27.1 and 27.2 perform the same function on the ''biblio" database. The difference between the two listings is simply the objects and methods used to create returned records. After the recordset or resultset is established, the remaining statements simply print each entry in the first field. In the RDO example, the ODBC data source MyDSN was created previously with the ODBC Manager.
note.gif To use the Remote Data Objects, you need to add a reference to the Microsoft Remote Data Object from the Project References menu. square.gif

 
< previous page page_605 next page >